package com.corx.network.mysqlstorage.repository;

import com.corx.network.mysqlstorage.common.PageQuery;
import com.corx.network.mysqlstorage.common.PageResult;
import com.corx.network.mysqlstorage.model.DevicePoint;

import java.util.Collection;
import java.util.List;
import java.util.Optional;

/**
 * 设备采集点/订阅点 Repository
 * @author gx
 * @version 1.0.0
 */
public interface DevicePointRepository {

    Optional<DevicePoint> findById(Long id);

    List<DevicePoint> findByDeviceId(Long deviceId);

    List<DevicePoint> findByDeviceIds(Collection<Long> deviceIds);

    void save(DevicePoint point);

    void update(DevicePoint point);

    void delete(Long id);

    PageResult<DevicePoint> findByPage(DevicePoint model, PageQuery pageQuery);
}
